/**
 * Created by zhulingxiao on 2017/6/7.
 */
const initialState = { loading : false };

import { TABLE_SUCCESS, TABLE_LOADING } from '../actions/table';

const table = (state = initialState, action) => {

  switch (action.type) {

    case TABLE_SUCCESS:
      return Object.assign({}, state, {
        loading: false
      });

    case TABLE_LOADING:
      return Object.assign({}, state, {
        loading: true
      });

    default:
      return state
  }

}

export default table
